package com.liuxinlong.modules.system.controller;

import com.liuxinlong.modules.common.controller.response.BaseResp;
import com.liuxinlong.modules.system.service.SystemService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * 系统信息控制层
 * 
 * @author liuxinlong@hotwater.com.cn
 * @version 1.0.0
 * @since 2023-05-16
 */
@RestController
@RequestMapping("/system")
public class SystemController {

	@Autowired
	private SystemService systemService;

	/**
	 * 查询系统信息
	 *
	 * @return 系统信息
	 */
	@GetMapping("page")
	public BaseResp getSystemInfo() {
		Map<String, Object> dataMap = systemService.getSystemInfo();

		BaseResp resp = new BaseResp();
		resp.setRetMessage("查询系统信息成功");
		resp.setDataMap(dataMap);
		return resp;
	}
}
